All the data used in this assignment is extracted from City of Cambridge.
boudary <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Boundary/CDD_Neighborhoods/BOUNDARY_CDDNeighborhoods.geojson")
building <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Basemap/Buildings/BASEMAP_Buildings.geojson")
landuse <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/CDD/Land_Use/CDD_LandUse.topojson")
zoning <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/CDD/Zoning_Districts/CDD_ZoningDistricts.geojson")
tree <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Environmental/Trees/ENVIRONMENTAL_StreetTrees.geojson")
pubschool <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Landmark/Public_Schools/LANDMARK_PublicSchools.geojson")
prischool <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Landmark/Private_Schools/LANDMARK_PrivateSchools.geojson")
road <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Basemap/Roads/BASEMAP_Roads.geojson")
openspace <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Recreation/Open_Space/RECREATION_OpenSpace.geojson")
strlights <- read_sf("https://github.com/cambridgegis/cambridgegis_data/raw/main/Infra/Street_Lights/INFRA_StreetLights.geojson")
ggplot(data = openspace)+
annotation_map_tile(zoomin = 0, progress = "none") +
geom_sf() +
geom_sf(data = pubschool) +
geom_sf(data = prischool)
## Loading required namespace: raster
ggplot()+
annotation_map_tile(data = openspace, zoomin = 0, progress = "none", type = "cartolight") +
geom_sf(data = openspace, aes(fill = OWNER)) +
geom_sf(data = pubschool, size = 5, aes(color = "C"), show.legend = "point", alpha = 1/3) +
geom_sf(data = prischool, size = 5, aes(color = "D"), show.legend = "point", alpha = 1/3) +
scale_color_manual(values = c("C" = "seagreen1", "D" = "tomato"), name = "School") +
theme_void()
ggplot(data = openspace) +
annotation_map_tile(zoomin = 0, progress = "none", type = "cartolight") +
geom_sf(data = openspace, aes(color = OWNER, fill = OWNER)) +
geom_sf(data = pubschool, color = "seagreen1") +
geom_sf(data = pubschool, size = 40, color = "seagreen1", alpha = 1/15) +
geom_sf(data = prischool, color = "tomato") +
geom_sf(data = prischool, size = 40, color = "tomato", alpha = 1/15)+
theme_void() +
labs(caption = "Map tiles by OpenStreetMap")
ggplot(data = openspace)+
annotation_map_tile(zoomin = 1, progress = "none", type = "stamenbw")+
geom_sf(color = NA, alpha = 1/3, aes(fill="openspace"))+
geom_sf(data = pubschool, size = 1, alpha = 1, aes(color="pubschool")) +
geom_sf(data = prischool, size = 1, alpha = 1, aes(color="prischool")) +
scale_fill_manual(values = "seagreen", name = " ", labels = "Open Space") +
scale_color_manual(values = c("slateblue3", "tomato3"), labels = c("Public Schools", "Private Schools"), name = " ")
ggplot(openspace)+
annotation_map_tile(zoomin = 0, progress = "none", type = "cartolight")+
geom_sf(fill = "darkolivegreen3", alpha = 0.75, aes(color = "OPENSPACE"))+
geom_sf(data = prischool, shape = 17, size = 2, aes(color = "Private School"))+
geom_sf(data = pubschool, shape = 15, size = 2, aes(color = "Public School"))+
scale_color_manual(values = c ("NA","blue", "firebrick1"), name = "")
ggplot(openspace)+
annotation_map_tile(zoomin = 0, progress = "none", type = "cartodark")+
geom_sf(fill = "lightpink", alpha = 0.25, aes(color = "OPENSPACE"))+
geom_sf(data = prischool, size = 2, aes(color = "Private School"))+
geom_sf(data = pubschool, size = 2, aes(color = "Public School"))+
scale_color_manual(values = c ("NA","gray100", "gray55"), name = "")
ggplot(openspace)+
geom_sf(fill = "black", alpha = 0.25, aes(color = "OPENSPACE"))+
geom_sf(data = prischool, shape = 3, size = 3, aes(color = "Private School"))+
geom_sf(data = pubschool, shape = 4, size = 3, aes(color = "Public School"))+
scale_color_manual(values = c ("NA","blue", "firebrick1"), name = "")+
theme_void()